export class Slider {
    constructor($target) {
        this.target = $target;
        this.ul = this.target.find("ul");
        this.height = this.ul.find("li").height();
    }

    init() {
        this.run();
    }

    run() {
        setInterval(() => {
            this.ul.animate({
                marginTop: -this.height
            }, 2000, () => {
                this.ul.css({ "margin-top": 0 })
            })
            this.ul.append(this.ul.find("li:first-child"))
        }, 2000)
    }
}